home *** CD-ROM | disk | FTP | other *** search
/ CD Concept 6 / CD Concept 06.iso / mac / UTILITAIRE / Little Smalltalk v3.1.4 / C Source / Sources / CLStSwitchboard.cp < prev    next >
Text File  |  1994-10-13  |  1KB  |  41 lines

  1. //=============================================================================
  2. //    Little Smalltalk, version 3
  3. //    Written by Tim Budd, Oregon State University, July 1988
  4. //
  5. //    Symantec Think Class Library interface code 
  6. //        ⌐Julian Barkway, April 1994, all rights reserved. 
  7. //
  8. //    CLStSwitchboard.cp
  9. //    ------------------
  10. //    Overridden merthods from CSwitchboard
  11. //=============================================================================
  12.  
  13. #include "CLStSwitchboard.h"
  14. #include "CLStApp.h"
  15.  
  16. extern CLStApp        *gSmalltalk;
  17. extern CApplication    *gApplication;
  18.  
  19. //={OVERRIDE}======================================================================
  20. // GetAnEvent - get the next event and store it in gApplication for later retrieval
  21. //=================================================================================
  22. Boolean    CLStSwitchboard::GetAnEvent (EventRecord *event)
  23. {
  24.     Boolean     retVal;
  25.     WindowPtr     w;
  26.     
  27.     retVal = inherited::GetAnEvent (event);
  28.     ((CLStApp *)gApplication)->lastEvent = *event;
  29.     if  (event->what == mouseDown) {
  30.         ((CLStApp *)gApplication)->winPart = FindWindow (event->where, &w);
  31.         if (((CLStApp *)gApplication)->winPart == inMenuBar) {
  32.             gSmalltalk->smalltalkCmd   = FALSE;
  33.             gSmalltalk->lastEvent.what = 0;
  34.         }
  35.     }
  36.     else
  37.         ((CLStApp *)gApplication)->winPart = 0;
  38.         
  39.     return retVal;
  40. }
  41.